
const state = {
  dbConnectionProperty: {
    url: null,
    username: null
  },
  genConfig: {
    author: null,
    packageName: null,
    moduleName: null,
    tableName: null
  }

}

const mutations = {
  SET_DB_CONNECTION_PROPERTY: (state, dbConnectionProperty) => {
    state.dbConnectionProperty = dbConnectionProperty
  },
  SET_GEN_CONFIG: (state, genConfig) => {
    state.genConfig = genConfig
  }

}

const actions = {
  setDbConnectionProperty({ commit }, dbConnectionProperty) {
    commit('SET_DB_CONNECTION_PROPERTY', dbConnectionProperty)
  },
  setGenConfig({ commit }, genConfig) {
    commit('SET_GEN_CONFIG', genConfig)
  }

}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
